package cn.xawl.common.to.es;

import lombok.Data;

import java.math.BigDecimal;
import java.util.List;

/**
 * @author lh
 * @date 2020/08/15 13:01:53
 *
 * 用来存储到es中的数据模型
 *
 **/
public class SkuEsModel {

    public Long getSkuId() {
        return skuId;
    }

    public void setSkuId(Long skuId) {
        this.skuId = skuId;
    }

    public Long getSpuId() {
        return spuId;
    }

    public void setSpuId(Long spuId) {
        this.spuId = spuId;
    }

    public String getSkuTitle() {
        return skuTitle;
    }

    public void setSkuTitle(String skuTitle) {
        this.skuTitle = skuTitle;
    }

    public BigDecimal getSkuPrice() {
        return skuPrice;
    }

    public void setSkuPrice(BigDecimal skuPrice) {
        this.skuPrice = skuPrice;
    }

    public String getSkuImg() {
        return skuImg;
    }

    public void setSkuImg(String skuImg) {
        this.skuImg = skuImg;
    }

    public Long getSaleCount() {
        return saleCount;
    }

    public void setSaleCount(Long saleCount) {
        this.saleCount = saleCount;
    }

    public Boolean getHasStock() {
        return hasStock;
    }

    public void setHasStock(Boolean hasStock) {
        this.hasStock = hasStock;
    }

    public Long getHotScore() {
        return hotScore;
    }

    public void setHotScore(Long hotScore) {
        this.hotScore = hotScore;
    }

    public Long getBrandId() {
        return brandId;
    }

    public void setBrandId(Long brandId) {
        this.brandId = brandId;
    }

    public Long getCatalogId() {
        return catalogId;
    }

    public void setCatalogId(Long catalogId) {
        this.catalogId = catalogId;
    }

    public String getBrandName() {
        return brandName;
    }

    public void setBrandName(String brandName) {
        this.brandName = brandName;
    }

    public String getBrandImg() {
        return brandImg;
    }

    public void setBrandImg(String brandImg) {
        this.brandImg = brandImg;
    }

    public String getCatalogName() {
        return catalogName;
    }

    public void setCatalogName(String catalogName) {
        this.catalogName = catalogName;
    }

    public List<Attrs> getAttrs() {
        return attrs;
    }

    public void setAttrs(List<Attrs> attrs) {
        this.attrs = attrs;
    }

    /**
     * "skuId": {
     *         "type": "long"
     *       }
     */
    private Long skuId;

    /**
     * "spuId": {
     *         "type": "keyword"
     *       }
     */
    private Long spuId;

    /**
     * "skuTitle": {
     *         "type": "text",
     *         "analyzer": "ik_smart"
     *       }
     */
    private String skuTitle;

    /**
     * "skuPrice": {
     *         "type": "keyword"
     *       }
     */
    private BigDecimal skuPrice;

    /**
     * "skuImg": {
     *         "type": "keyword",
     *         "index": false,
     *         "doc_values": false
     *       }
     */

    private String skuImg;

    /**
     * "saleCount": {
     *         "type": "long"
     *       }
     */
    private Long saleCount;

    /**
     *  "hasStock": {
     *         "type": "boolean"
     *       }
     */
    private Boolean hasStock;

    /**
     * "hotScore": {
     *         "type": "long"
     *       }
     */
    private Long hotScore;

    /**
     * "brandId": {
     *         "type": "long"
     *       }
     */
    private Long brandId;

    /**
     * "catalogId": {
     *         "type": "long"
     *       }
     */
    private Long catalogId;

    /**
     * "brandName": {
     *         "type": "keyword",
     *         "index": false,
     *         "doc_values": false
     *       }
     */
    private String brandName;

    /**
     * "brandImg": {
     *         "type": "keyword",
     *         "index": false,
     *         "doc_values": false
     *       }
     */
    private String brandImg;

    /**
     * "catalogName": {
     *         "type": "keyword",
     *         "index": false,
     *         "doc_values": false
     *       }
     */
    private String catalogName;

    /**
     * "attrs": {
     *         "type": "nested",
     *         "properties": {
     *           "attrId": {
     *             "type": "long"
     *           },
     *           "attrName": {
     *             "type": "keyword",
     *             "index": false,
     *             "doc_values": false
     *           },
     *           "attrValue": {
     *             "type": "keyword"
     *           }
     *         }
     *       }
     */
    private List<Attrs> attrs;

    @Data
    public static class Attrs {
        private Long attrId;
        private String attrName;
        private String attrValue;
    }


}
